unit U_fm_estado;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.DBCtrls, Vcl.Mask,
  Vcl.ImgList, Vcl.ComCtrls, Vcl.ToolWin, Vcl.ExtCtrls, Vcl.Buttons, Vcl.Grids,
  Vcl.DBGrids;

type
  Tfm_estado = class(TForm)
    pnl1: TPanel;
    pnl2: TPanel;
    tlb1: TToolBar;
    btn1: TToolButton;
    btn2: TToolButton;
    btn3: TToolButton;
    btn4: TToolButton;
    btn5: TToolButton;
    btn6: TToolButton;
    btn7: TToolButton;
    btn8: TToolButton;
    btn9: TToolButton;
    btn10: TToolButton;
    btn11: TToolButton;
    pgc1: TPageControl;
    ts1: TTabSheet;
    ts2: TTabSheet;
    ts3: TTabSheet;
    ts4: TTabSheet;
    ts5: TTabSheet;
    ts6: TTabSheet;
    il1: TImageList;
    grp2: TGroupBox;
    lbl8: TLabel;
    btn12: TBitBtn;
    grp1: TGroupBox;
    grp3: TGroupBox;
    lbl7: TLabel;
    lbl5: TLabel;
    dbedtMODULO: TDBEdit;
    dbedtROTINA: TDBEdit;
    grp4: TGroupBox;
    lbl1: TLabel;
    lbl2: TLabel;
    lbl3: TLabel;
    lbl4: TLabel;
    lbl6: TLabel;
    dbedtID: TDBEdit;
    dbedtVERSAO: TDBEdit;
    dbedtDATA: TDBEdit;
    dbedtTESTADOR: TDBEdit;
    dbtxtPROJETO: TDBText;
    dbtxtVERSAO: TDBText;
    dbtxtDATA: TDBText;
    dbtxt4: TDBText;
    dbtxt5: TDBText;
    dbtxt6: TDBText;
    dbtxt7: TDBText;
    dbtxt8: TDBText;
    dbtxt9: TDBText;
    DB_IMAGEM: TDBImage;
    btn13: TSpeedButton;
    dbedtPROJETO: TDBEdit;
    procedure FormShow(Sender: TObject);
    procedure btn1Click(Sender: TObject);
    procedure btn13Click(Sender: TObject);
    procedure btn11Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fm_estado: Tfm_estado;

implementation

{$R *.dfm}

uses U_dm_principal, U_fm_loc_proj;

procedure Tfm_estado.btn11Click(Sender: TObject);
begin
Close;
end;

procedure Tfm_estado.btn13Click(Sender: TObject);
begin
fm_loc_proj:=Tfm_loc_proj.Create(Application);
    fm_loc_proj.ShowModal;
 if fm_loc_proj.ModalResult=mrok then
 begin
   dbedtPROJETO.Text:=dm_principal.cds_projetosDESCRICAO.Text;
 end;
end;

procedure Tfm_estado.btn1Click(Sender: TObject);
begin
dm_principal.cds_estado.Insert;
dm_principal.cds_estadoDATA.Value:=Now;
end;

procedure Tfm_estado.FormShow(Sender: TObject);
begin
dm_principal.cds_estado.Open;
end;

end.
